import 'package:flutter_house_manager/constants/index.dart';
import 'package:flutter_house_manager/utils/DioRequest.dart';

Future<dynamic> sendCodeAPI(params) =>
    dioRequest.get(HTTP_PATH.SEND_CODE, params: params);

// 2. 登录
Future<dynamic> loginAPI(Map<String, dynamic> data) =>
    dioRequest.post(HTTP_PATH.LOGIN, data: data);
Future<dynamic> getUserInfoAPI() => dioRequest.get(HTTP_PATH.USER_INFO);

Future updateUserInfoAPI(data) =>
    dioRequest.put(HTTP_PATH.USER_INFO, data: data);

// 上传图片
Future<dynamic> uploadPhotoAPI(data) =>
    dioRequest.upload(HTTP_PATH.UPLOAD, data: data);
